/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  
  checkConfig(config);
  @endpoint = getEndpoint('alinlp', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model DataValue = {
  serviceId?: long(name='ServiceId', example='1'),
  status?: string(name='Status', example='failed'),
  code?: int32(name='Code', example='6003'),
  message?: string(name='Message'),
}

model ADClockRequest {
  params?: string(name='Params'),
  serviceCode?: string(name='ServiceCode'),
}

model ADClockResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ADClockResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ADClockResponseBody(name='body'),
}

/**
 * @summary ad画钟算法处理算法
 *
 * @param request ADClockRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ADClockResponse
 */
async function aDClockWithOptions(request: ADClockRequest, runtime: Util.RuntimeOptions): ADClockResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.params)) {
    body['Params'] = request.params;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ADClock',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ad画钟算法处理算法
 *
 * @param request ADClockRequest
 * @return ADClockResponse
 */
async function aDClock(request: ADClockRequest): ADClockResponse {
  var runtime = new Util.RuntimeOptions{};
  return aDClockWithOptions(request, runtime);
}

model ADMMURequest {
  params?: string(name='Params'),
  serviceCode?: string(name='ServiceCode'),
}

model ADMMUResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ADMMUResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ADMMUResponseBody(name='body'),
}

/**
 * @summary ad语音处理算法
 *
 * @param request ADMMURequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ADMMUResponse
 */
async function aDMMUWithOptions(request: ADMMURequest, runtime: Util.RuntimeOptions): ADMMUResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.params)) {
    body['Params'] = request.params;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ADMMU',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ad语音处理算法
 *
 * @param request ADMMURequest
 * @return ADMMUResponse
 */
async function aDMMU(request: ADMMURequest): ADMMUResponse {
  var runtime = new Util.RuntimeOptions{};
  return aDMMUWithOptions(request, runtime);
}

model ADMiniCogRequest {
  params?: string(name='Params'),
  serviceCode?: string(name='ServiceCode'),
}

model ADMiniCogResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ADMiniCogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ADMiniCogResponseBody(name='body'),
}

/**
 * @summary AD筛查能力，处理用户传入的答题音频和画钟图片从而计算风险结果
 *
 * @param request ADMiniCogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ADMiniCogResponse
 */
async function aDMiniCogWithOptions(request: ADMiniCogRequest, runtime: Util.RuntimeOptions): ADMiniCogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.params)) {
    body['Params'] = request.params;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ADMiniCog',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary AD筛查能力，处理用户传入的答题音频和画钟图片从而计算风险结果
 *
 * @param request ADMiniCogRequest
 * @return ADMiniCogResponse
 */
async function aDMiniCog(request: ADMiniCogRequest): ADMiniCogResponse {
  var runtime = new Util.RuntimeOptions{};
  return aDMiniCogWithOptions(request, runtime);
}

model ADMiniCogResultRequest {
  params?: string(name='Params'),
  serviceCode?: string(name='ServiceCode'),
}

model ADMiniCogResultResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model ADMiniCogResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ADMiniCogResultResponseBody(name='body'),
}

/**
 * @summary AD筛查能力,提供给用户查询筛查结果，筛查结果来源自接口ADMIniCog
 *
 * @param request ADMiniCogResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ADMiniCogResultResponse
 */
async function aDMiniCogResultWithOptions(request: ADMiniCogResultRequest, runtime: Util.RuntimeOptions): ADMiniCogResultResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.params)) {
    body['Params'] = request.params;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ADMiniCogResult',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary AD筛查能力,提供给用户查询筛查结果，筛查结果来源自接口ADMIniCog
 *
 * @param request ADMiniCogResultRequest
 * @return ADMiniCogResultResponse
 */
async function aDMiniCogResult(request: ADMiniCogResultRequest): ADMiniCogResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return aDMiniCogResultWithOptions(request, runtime);
}

model DeleteServiceDataByConditionsRequest {
  conditions?: map[string]any(name='Conditions', description='This parameter is required.'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
  xDashScopeOpenAPISource?: string(name='X-DashScope-OpenAPISource'),
}

model DeleteServiceDataByConditionsShrinkRequest {
  conditionsShrink?: string(name='Conditions', description='This parameter is required.'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
  xDashScopeOpenAPISource?: string(name='X-DashScope-OpenAPISource'),
}

model DeleteServiceDataByConditionsResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: any(name='Data', example='null'),
  msg?: string(name='Msg', example='null'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model DeleteServiceDataByConditionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteServiceDataByConditionsResponseBody(name='body'),
}

/**
 * @summary 根据条件删除服务数据
 *
 * @param tmpReq DeleteServiceDataByConditionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteServiceDataByConditionsResponse
 */
async function deleteServiceDataByConditionsWithOptions(tmpReq: DeleteServiceDataByConditionsRequest, runtime: Util.RuntimeOptions): DeleteServiceDataByConditionsResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteServiceDataByConditionsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.conditions)) {
    request.conditionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.conditions, 'Conditions', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.conditionsShrink)) {
    body['Conditions'] = request.conditionsShrink;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  if (!Util.isUnset(request.xDashScopeOpenAPISource)) {
    body['X-DashScope-OpenAPISource'] = request.xDashScopeOpenAPISource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteServiceDataByConditions',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据条件删除服务数据
 *
 * @param request DeleteServiceDataByConditionsRequest
 * @return DeleteServiceDataByConditionsResponse
 */
async function deleteServiceDataByConditions(request: DeleteServiceDataByConditionsRequest): DeleteServiceDataByConditionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteServiceDataByConditionsWithOptions(request, runtime);
}

model DeleteServiceDataByIdsRequest {
  ids?: [ string ](name='Ids', description='This parameter is required.'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
}

model DeleteServiceDataByIdsShrinkRequest {
  idsShrink?: string(name='Ids', description='This parameter is required.'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
}

model DeleteServiceDataByIdsResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: any(name='Data', example='null'),
  msg?: string(name='Msg', example='null'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model DeleteServiceDataByIdsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteServiceDataByIdsResponseBody(name='body'),
}

/**
 * @summary 根据ids删除服务数据
 *
 * @param tmpReq DeleteServiceDataByIdsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteServiceDataByIdsResponse
 */
async function deleteServiceDataByIdsWithOptions(tmpReq: DeleteServiceDataByIdsRequest, runtime: Util.RuntimeOptions): DeleteServiceDataByIdsResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteServiceDataByIdsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.ids)) {
    request.idsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.ids, 'Ids', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.idsShrink)) {
    body['Ids'] = request.idsShrink;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteServiceDataByIds',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据ids删除服务数据
 *
 * @param request DeleteServiceDataByIdsRequest
 * @return DeleteServiceDataByIdsResponse
 */
async function deleteServiceDataByIds(request: DeleteServiceDataByIdsRequest): DeleteServiceDataByIdsResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteServiceDataByIdsWithOptions(request, runtime);
}

model GetBrandChEcomRequest {
  imageUrl?: string(name='ImageUrl'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text'),
}

model GetBrandChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetBrandChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBrandChEcomResponseBody(name='body'),
}

/**
 * @summary 品牌预测
 *
 * @param request GetBrandChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBrandChEcomResponse
 */
async function getBrandChEcomWithOptions(request: GetBrandChEcomRequest, runtime: Util.RuntimeOptions): GetBrandChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.imageUrl)) {
    body['ImageUrl'] = request.imageUrl;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetBrandChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 品牌预测
 *
 * @param request GetBrandChEcomRequest
 * @return GetBrandChEcomResponse
 */
async function getBrandChEcom(request: GetBrandChEcomRequest): GetBrandChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBrandChEcomWithOptions(request, runtime);
}

model GetCateChEcomRequest {
  imageUrl?: string(name='ImageUrl'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetCateChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetCateChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCateChEcomResponseBody(name='body'),
}

/**
 * @summary 类目预测
 *
 * @param request GetCateChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCateChEcomResponse
 */
async function getCateChEcomWithOptions(request: GetCateChEcomRequest, runtime: Util.RuntimeOptions): GetCateChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.imageUrl)) {
    body['ImageUrl'] = request.imageUrl;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetCateChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 类目预测
 *
 * @param request GetCateChEcomRequest
 * @return GetCateChEcomResponse
 */
async function getCateChEcom(request: GetCateChEcomRequest): GetCateChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCateChEcomWithOptions(request, runtime);
}

model GetCheckDuplicationChMedicalRequest {
  originQ?: string(name='OriginQ', description='This parameter is required.'),
  originT?: string(name='OriginT', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
}

model GetCheckDuplicationChMedicalResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetCheckDuplicationChMedicalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCheckDuplicationChMedicalResponseBody(name='body'),
}

/**
 * @param request GetCheckDuplicationChMedicalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCheckDuplicationChMedicalResponse
 */
async function getCheckDuplicationChMedicalWithOptions(request: GetCheckDuplicationChMedicalRequest, runtime: Util.RuntimeOptions): GetCheckDuplicationChMedicalResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.originQ)) {
    body['OriginQ'] = request.originQ;
  }
  if (!Util.isUnset(request.originT)) {
    body['OriginT'] = request.originT;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetCheckDuplicationChMedical',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetCheckDuplicationChMedicalRequest
 * @return GetCheckDuplicationChMedicalResponse
 */
async function getCheckDuplicationChMedical(request: GetCheckDuplicationChMedicalRequest): GetCheckDuplicationChMedicalResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCheckDuplicationChMedicalWithOptions(request, runtime);
}

model GetDiagnosisChMedicalRequest {
  name?: string(name='Name', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
}

model GetDiagnosisChMedicalResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetDiagnosisChMedicalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDiagnosisChMedicalResponseBody(name='body'),
}

/**
 * @param request GetDiagnosisChMedicalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDiagnosisChMedicalResponse
 */
async function getDiagnosisChMedicalWithOptions(request: GetDiagnosisChMedicalRequest, runtime: Util.RuntimeOptions): GetDiagnosisChMedicalResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDiagnosisChMedical',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetDiagnosisChMedicalRequest
 * @return GetDiagnosisChMedicalResponse
 */
async function getDiagnosisChMedical(request: GetDiagnosisChMedicalRequest): GetDiagnosisChMedicalResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDiagnosisChMedicalWithOptions(request, runtime);
}

model GetDpChEcomRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetDpChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetDpChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDpChEcomResponseBody(name='body'),
}

/**
 * @param request GetDpChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDpChEcomResponse
 */
async function getDpChEcomWithOptions(request: GetDpChEcomRequest, runtime: Util.RuntimeOptions): GetDpChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDpChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetDpChEcomRequest
 * @return GetDpChEcomResponse
 */
async function getDpChEcom(request: GetDpChEcomRequest): GetDpChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDpChEcomWithOptions(request, runtime);
}

model GetDpChGeneralCTBRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetDpChGeneralCTBResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetDpChGeneralCTBResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDpChGeneralCTBResponseBody(name='body'),
}

/**
 * @param request GetDpChGeneralCTBRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDpChGeneralCTBResponse
 */
async function getDpChGeneralCTBWithOptions(request: GetDpChGeneralCTBRequest, runtime: Util.RuntimeOptions): GetDpChGeneralCTBResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDpChGeneralCTB',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetDpChGeneralCTBRequest
 * @return GetDpChGeneralCTBResponse
 */
async function getDpChGeneralCTB(request: GetDpChGeneralCTBRequest): GetDpChGeneralCTBResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDpChGeneralCTBWithOptions(request, runtime);
}

model GetDpChGeneralStanfordRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetDpChGeneralStanfordResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetDpChGeneralStanfordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDpChGeneralStanfordResponseBody(name='body'),
}

/**
 * @param request GetDpChGeneralStanfordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDpChGeneralStanfordResponse
 */
async function getDpChGeneralStanfordWithOptions(request: GetDpChGeneralStanfordRequest, runtime: Util.RuntimeOptions): GetDpChGeneralStanfordResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDpChGeneralStanford',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetDpChGeneralStanfordRequest
 * @return GetDpChGeneralStanfordResponse
 */
async function getDpChGeneralStanford(request: GetDpChGeneralStanfordRequest): GetDpChGeneralStanfordResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDpChGeneralStanfordWithOptions(request, runtime);
}

model GetEcChGeneralRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetEcChGeneralResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetEcChGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetEcChGeneralResponseBody(name='body'),
}

/**
 * @param request GetEcChGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetEcChGeneralResponse
 */
async function getEcChGeneralWithOptions(request: GetEcChGeneralRequest, runtime: Util.RuntimeOptions): GetEcChGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetEcChGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetEcChGeneralRequest
 * @return GetEcChGeneralResponse
 */
async function getEcChGeneral(request: GetEcChGeneralRequest): GetEcChGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEcChGeneralWithOptions(request, runtime);
}

model GetEcEnGeneralRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetEcEnGeneralResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetEcEnGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetEcEnGeneralResponseBody(name='body'),
}

/**
 * @param request GetEcEnGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetEcEnGeneralResponse
 */
async function getEcEnGeneralWithOptions(request: GetEcEnGeneralRequest, runtime: Util.RuntimeOptions): GetEcEnGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetEcEnGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetEcEnGeneralRequest
 * @return GetEcEnGeneralResponse
 */
async function getEcEnGeneral(request: GetEcEnGeneralRequest): GetEcEnGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEcEnGeneralWithOptions(request, runtime);
}

model GetEmbeddingRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text'),
  textType?: string(name='TextType'),
}

model GetEmbeddingResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetEmbeddingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetEmbeddingResponseBody(name='body'),
}

/**
 * @summary embedding
 *
 * @param request GetEmbeddingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetEmbeddingResponse
 */
async function getEmbeddingWithOptions(request: GetEmbeddingRequest, runtime: Util.RuntimeOptions): GetEmbeddingResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.textType)) {
    body['TextType'] = request.textType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetEmbedding',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary embedding
 *
 * @param request GetEmbeddingRequest
 * @return GetEmbeddingResponse
 */
async function getEmbedding(request: GetEmbeddingRequest): GetEmbeddingResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEmbeddingWithOptions(request, runtime);
}

model GetItemPubChEcomRequest {
  imageUrl?: string(name='ImageUrl'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetItemPubChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetItemPubChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetItemPubChEcomResponseBody(name='body'),
}

/**
 * @summary 微购整合接口
 *
 * @param request GetItemPubChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetItemPubChEcomResponse
 */
async function getItemPubChEcomWithOptions(request: GetItemPubChEcomRequest, runtime: Util.RuntimeOptions): GetItemPubChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.imageUrl)) {
    body['ImageUrl'] = request.imageUrl;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetItemPubChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 微购整合接口
 *
 * @param request GetItemPubChEcomRequest
 * @return GetItemPubChEcomResponse
 */
async function getItemPubChEcom(request: GetItemPubChEcomRequest): GetItemPubChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getItemPubChEcomWithOptions(request, runtime);
}

model GetKeywordChEcomRequest {
  apiVersion?: string(name='ApiVersion'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetKeywordChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetKeywordChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetKeywordChEcomResponseBody(name='body'),
}

/**
 * @param request GetKeywordChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetKeywordChEcomResponse
 */
async function getKeywordChEcomWithOptions(request: GetKeywordChEcomRequest, runtime: Util.RuntimeOptions): GetKeywordChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.apiVersion)) {
    body['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetKeywordChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetKeywordChEcomRequest
 * @return GetKeywordChEcomResponse
 */
async function getKeywordChEcom(request: GetKeywordChEcomRequest): GetKeywordChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getKeywordChEcomWithOptions(request, runtime);
}

model GetKeywordEnEcomRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetKeywordEnEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetKeywordEnEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetKeywordEnEcomResponseBody(name='body'),
}

/**
 * @param request GetKeywordEnEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetKeywordEnEcomResponse
 */
async function getKeywordEnEcomWithOptions(request: GetKeywordEnEcomRequest, runtime: Util.RuntimeOptions): GetKeywordEnEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetKeywordEnEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetKeywordEnEcomRequest
 * @return GetKeywordEnEcomResponse
 */
async function getKeywordEnEcom(request: GetKeywordEnEcomRequest): GetKeywordEnEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getKeywordEnEcomWithOptions(request, runtime);
}

model GetMedicineChMedicalRequest {
  factory?: string(name='Factory'),
  name?: string(name='Name', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  specification?: string(name='Specification'),
  unit?: string(name='Unit'),
}

model GetMedicineChMedicalResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetMedicineChMedicalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetMedicineChMedicalResponseBody(name='body'),
}

/**
 * @param request GetMedicineChMedicalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetMedicineChMedicalResponse
 */
async function getMedicineChMedicalWithOptions(request: GetMedicineChMedicalRequest, runtime: Util.RuntimeOptions): GetMedicineChMedicalResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.factory)) {
    body['Factory'] = request.factory;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.specification)) {
    body['Specification'] = request.specification;
  }
  if (!Util.isUnset(request.unit)) {
    body['Unit'] = request.unit;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetMedicineChMedical',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetMedicineChMedicalRequest
 * @return GetMedicineChMedicalResponse
 */
async function getMedicineChMedical(request: GetMedicineChMedicalRequest): GetMedicineChMedicalResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMedicineChMedicalWithOptions(request, runtime);
}

model GetNerChEcomRequest {
  lexerId?: string(name='LexerId'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetNerChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetNerChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetNerChEcomResponseBody(name='body'),
}

/**
 * @param request GetNerChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetNerChEcomResponse
 */
async function getNerChEcomWithOptions(request: GetNerChEcomRequest, runtime: Util.RuntimeOptions): GetNerChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.lexerId)) {
    body['LexerId'] = request.lexerId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetNerChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetNerChEcomRequest
 * @return GetNerChEcomResponse
 */
async function getNerChEcom(request: GetNerChEcomRequest): GetNerChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNerChEcomWithOptions(request, runtime);
}

model GetNerChMedicalRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetNerChMedicalResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetNerChMedicalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetNerChMedicalResponseBody(name='body'),
}

/**
 * @param request GetNerChMedicalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetNerChMedicalResponse
 */
async function getNerChMedicalWithOptions(request: GetNerChMedicalRequest, runtime: Util.RuntimeOptions): GetNerChMedicalResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetNerChMedical',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetNerChMedicalRequest
 * @return GetNerChMedicalResponse
 */
async function getNerChMedical(request: GetNerChMedicalRequest): GetNerChMedicalResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNerChMedicalWithOptions(request, runtime);
}

model GetNerCustomizedChEcomRequest {
  lexerId?: string(name='LexerId'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetNerCustomizedChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetNerCustomizedChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetNerCustomizedChEcomResponseBody(name='body'),
}

/**
 * @param request GetNerCustomizedChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetNerCustomizedChEcomResponse
 */
async function getNerCustomizedChEcomWithOptions(request: GetNerCustomizedChEcomRequest, runtime: Util.RuntimeOptions): GetNerCustomizedChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.lexerId)) {
    body['LexerId'] = request.lexerId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetNerCustomizedChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetNerCustomizedChEcomRequest
 * @return GetNerCustomizedChEcomResponse
 */
async function getNerCustomizedChEcom(request: GetNerCustomizedChEcomRequest): GetNerCustomizedChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNerCustomizedChEcomWithOptions(request, runtime);
}

model GetNerCustomizedSeaEcomRequest {
  language?: string(name='Language', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetNerCustomizedSeaEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetNerCustomizedSeaEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetNerCustomizedSeaEcomResponseBody(name='body'),
}

/**
 * @param request GetNerCustomizedSeaEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetNerCustomizedSeaEcomResponse
 */
async function getNerCustomizedSeaEcomWithOptions(request: GetNerCustomizedSeaEcomRequest, runtime: Util.RuntimeOptions): GetNerCustomizedSeaEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.language)) {
    body['Language'] = request.language;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetNerCustomizedSeaEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetNerCustomizedSeaEcomRequest
 * @return GetNerCustomizedSeaEcomResponse
 */
async function getNerCustomizedSeaEcom(request: GetNerCustomizedSeaEcomRequest): GetNerCustomizedSeaEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNerCustomizedSeaEcomWithOptions(request, runtime);
}

model GetOpenNLURequest {
  examples?: string(name='Examples'),
  labels?: string(name='Labels'),
  sentence?: string(name='Sentence'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  task?: string(name='Task'),
}

model GetOpenNLUResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetOpenNLUResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetOpenNLUResponseBody(name='body'),
}

/**
 * @summary openNLU
 *
 * @param request GetOpenNLURequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetOpenNLUResponse
 */
async function getOpenNLUWithOptions(request: GetOpenNLURequest, runtime: Util.RuntimeOptions): GetOpenNLUResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.examples)) {
    body['Examples'] = request.examples;
  }
  if (!Util.isUnset(request.labels)) {
    body['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.sentence)) {
    body['Sentence'] = request.sentence;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.task)) {
    body['Task'] = request.task;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetOpenNLU',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary openNLU
 *
 * @param request GetOpenNLURequest
 * @return GetOpenNLUResponse
 */
async function getOpenNLU(request: GetOpenNLURequest): GetOpenNLUResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOpenNLUWithOptions(request, runtime);
}

model GetOpenNLUHighRecallRequest {
  examples?: string(name='Examples'),
  labels?: string(name='Labels'),
  sentence?: string(name='Sentence'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  task?: string(name='Task'),
}

model GetOpenNLUHighRecallResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetOpenNLUHighRecallResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetOpenNLUHighRecallResponseBody(name='body'),
}

/**
 * @summary openNLU高召回版
 *
 * @param request GetOpenNLUHighRecallRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetOpenNLUHighRecallResponse
 */
async function getOpenNLUHighRecallWithOptions(request: GetOpenNLUHighRecallRequest, runtime: Util.RuntimeOptions): GetOpenNLUHighRecallResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.examples)) {
    body['Examples'] = request.examples;
  }
  if (!Util.isUnset(request.labels)) {
    body['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.sentence)) {
    body['Sentence'] = request.sentence;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.task)) {
    body['Task'] = request.task;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetOpenNLUHighRecall',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary openNLU高召回版
 *
 * @param request GetOpenNLUHighRecallRequest
 * @return GetOpenNLUHighRecallResponse
 */
async function getOpenNLUHighRecall(request: GetOpenNLUHighRecallRequest): GetOpenNLUHighRecallResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOpenNLUHighRecallWithOptions(request, runtime);
}

model GetOperationChMedicalRequest {
  name?: string(name='Name', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
}

model GetOperationChMedicalResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetOperationChMedicalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetOperationChMedicalResponseBody(name='body'),
}

/**
 * @param request GetOperationChMedicalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetOperationChMedicalResponse
 */
async function getOperationChMedicalWithOptions(request: GetOperationChMedicalRequest, runtime: Util.RuntimeOptions): GetOperationChMedicalResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetOperationChMedical',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetOperationChMedicalRequest
 * @return GetOperationChMedicalResponse
 */
async function getOperationChMedical(request: GetOperationChMedicalRequest): GetOperationChMedicalResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOperationChMedicalWithOptions(request, runtime);
}

model GetPosChEcomRequest {
  outType?: string(name='OutType'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId'),
}

model GetPosChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetPosChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPosChEcomResponseBody(name='body'),
}

/**
 * @param request GetPosChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPosChEcomResponse
 */
async function getPosChEcomWithOptions(request: GetPosChEcomRequest, runtime: Util.RuntimeOptions): GetPosChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetPosChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetPosChEcomRequest
 * @return GetPosChEcomResponse
 */
async function getPosChEcom(request: GetPosChEcomRequest): GetPosChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPosChEcomWithOptions(request, runtime);
}

model GetPosChGeneralRequest {
  outType?: string(name='OutType'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId'),
}

model GetPosChGeneralResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetPosChGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPosChGeneralResponseBody(name='body'),
}

/**
 * @param request GetPosChGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPosChGeneralResponse
 */
async function getPosChGeneralWithOptions(request: GetPosChGeneralRequest, runtime: Util.RuntimeOptions): GetPosChGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetPosChGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetPosChGeneralRequest
 * @return GetPosChGeneralResponse
 */
async function getPosChGeneral(request: GetPosChGeneralRequest): GetPosChGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPosChGeneralWithOptions(request, runtime);
}

model GetPriceChEcomRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetPriceChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetPriceChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPriceChEcomResponseBody(name='body'),
}

/**
 * @param request GetPriceChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPriceChEcomResponse
 */
async function getPriceChEcomWithOptions(request: GetPriceChEcomRequest, runtime: Util.RuntimeOptions): GetPriceChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetPriceChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetPriceChEcomRequest
 * @return GetPriceChEcomResponse
 */
async function getPriceChEcom(request: GetPriceChEcomRequest): GetPriceChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPriceChEcomWithOptions(request, runtime);
}

model GetSSETestRequest {
  params?: string(name='Params'),
  serviceCode?: string(name='ServiceCode'),
}

model GetSSETestResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetSSETestResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSSETestResponseBody(name='body'),
}

/**
 * @summary 测试sse
 *
 * @param request GetSSETestRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSSETestResponse
 */
async function getSSETestWithOptions(request: GetSSETestRequest, runtime: Util.RuntimeOptions): GetSSETestResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.params)) {
    body['Params'] = request.params;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSSETest',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 测试sse
 *
 * @param request GetSSETestRequest
 * @return GetSSETestResponse
 */
async function getSSETest(request: GetSSETestRequest): GetSSETestResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSSETestWithOptions(request, runtime);
}

model GetSaChGeneralRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetSaChGeneralResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetSaChGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSaChGeneralResponseBody(name='body'),
}

/**
 * @param request GetSaChGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSaChGeneralResponse
 */
async function getSaChGeneralWithOptions(request: GetSaChGeneralRequest, runtime: Util.RuntimeOptions): GetSaChGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSaChGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetSaChGeneralRequest
 * @return GetSaChGeneralResponse
 */
async function getSaChGeneral(request: GetSaChGeneralRequest): GetSaChGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSaChGeneralWithOptions(request, runtime);
}

model GetSaSeaEcomRequest {
  language?: string(name='Language', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetSaSeaEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetSaSeaEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSaSeaEcomResponseBody(name='body'),
}

/**
 * @param request GetSaSeaEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSaSeaEcomResponse
 */
async function getSaSeaEcomWithOptions(request: GetSaSeaEcomRequest, runtime: Util.RuntimeOptions): GetSaSeaEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.language)) {
    body['Language'] = request.language;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSaSeaEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetSaSeaEcomRequest
 * @return GetSaSeaEcomResponse
 */
async function getSaSeaEcom(request: GetSaSeaEcomRequest): GetSaSeaEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSaSeaEcomWithOptions(request, runtime);
}

model GetServiceDataImportStatusRequest {
  dataImportIds?: [ long ](name='DataImportIds', description='This parameter is required.'),
}

model GetServiceDataImportStatusShrinkRequest {
  dataImportIdsShrink?: string(name='DataImportIds', description='This parameter is required.'),
}

model GetServiceDataImportStatusResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: map[string]DataValue(name='Data'),
  msg?: string(name='Msg', example='null'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model GetServiceDataImportStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceDataImportStatusResponseBody(name='body'),
}

/**
 * @summary 获取服务数据导入状态
 *
 * @param tmpReq GetServiceDataImportStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceDataImportStatusResponse
 */
async function getServiceDataImportStatusWithOptions(tmpReq: GetServiceDataImportStatusRequest, runtime: Util.RuntimeOptions): GetServiceDataImportStatusResponse {
  Util.validateModel(tmpReq);
  var request = new GetServiceDataImportStatusShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.dataImportIds)) {
    request.dataImportIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.dataImportIds, 'DataImportIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.dataImportIdsShrink)) {
    body['DataImportIds'] = request.dataImportIdsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceDataImportStatus',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取服务数据导入状态
 *
 * @param request GetServiceDataImportStatusRequest
 * @return GetServiceDataImportStatusResponse
 */
async function getServiceDataImportStatus(request: GetServiceDataImportStatusRequest): GetServiceDataImportStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getServiceDataImportStatusWithOptions(request, runtime);
}

model GetSimilarityChMedicalRequest {
  originQ?: string(name='OriginQ', description='This parameter is required.'),
  originT?: string(name='OriginT', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
}

model GetSimilarityChMedicalResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetSimilarityChMedicalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSimilarityChMedicalResponseBody(name='body'),
}

/**
 * @param request GetSimilarityChMedicalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSimilarityChMedicalResponse
 */
async function getSimilarityChMedicalWithOptions(request: GetSimilarityChMedicalRequest, runtime: Util.RuntimeOptions): GetSimilarityChMedicalResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.originQ)) {
    body['OriginQ'] = request.originQ;
  }
  if (!Util.isUnset(request.originT)) {
    body['OriginT'] = request.originT;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSimilarityChMedical',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetSimilarityChMedicalRequest
 * @return GetSimilarityChMedicalResponse
 */
async function getSimilarityChMedical(request: GetSimilarityChMedicalRequest): GetSimilarityChMedicalResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSimilarityChMedicalWithOptions(request, runtime);
}

model GetSummaryChEcomRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetSummaryChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetSummaryChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSummaryChEcomResponseBody(name='body'),
}

/**
 * @param request GetSummaryChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSummaryChEcomResponse
 */
async function getSummaryChEcomWithOptions(request: GetSummaryChEcomRequest, runtime: Util.RuntimeOptions): GetSummaryChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSummaryChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetSummaryChEcomRequest
 * @return GetSummaryChEcomResponse
 */
async function getSummaryChEcom(request: GetSummaryChEcomRequest): GetSummaryChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSummaryChEcomWithOptions(request, runtime);
}

model GetTableQAServiceInfoByIdRequest {
  serviceCode?: string(name='ServiceCode'),
  serviceId?: string(name='ServiceId'),
}

model GetTableQAServiceInfoByIdResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetTableQAServiceInfoByIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTableQAServiceInfoByIdResponseBody(name='body'),
}

/**
 * @summary 根据id查询tableqa服务基本信息
 *
 * @param request GetTableQAServiceInfoByIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTableQAServiceInfoByIdResponse
 */
async function getTableQAServiceInfoByIdWithOptions(request: GetTableQAServiceInfoByIdRequest, runtime: Util.RuntimeOptions): GetTableQAServiceInfoByIdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetTableQAServiceInfoById',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据id查询tableqa服务基本信息
 *
 * @param request GetTableQAServiceInfoByIdRequest
 * @return GetTableQAServiceInfoByIdResponse
 */
async function getTableQAServiceInfoById(request: GetTableQAServiceInfoByIdRequest): GetTableQAServiceInfoByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTableQAServiceInfoByIdWithOptions(request, runtime);
}

model GetTcChEcomRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetTcChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetTcChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTcChEcomResponseBody(name='body'),
}

/**
 * @param request GetTcChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTcChEcomResponse
 */
async function getTcChEcomWithOptions(request: GetTcChEcomRequest, runtime: Util.RuntimeOptions): GetTcChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetTcChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetTcChEcomRequest
 * @return GetTcChEcomResponse
 */
async function getTcChEcom(request: GetTcChEcomRequest): GetTcChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTcChEcomWithOptions(request, runtime);
}

model GetTcChGeneralRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetTcChGeneralResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetTcChGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTcChGeneralResponseBody(name='body'),
}

/**
 * @param request GetTcChGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTcChGeneralResponse
 */
async function getTcChGeneralWithOptions(request: GetTcChGeneralRequest, runtime: Util.RuntimeOptions): GetTcChGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetTcChGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetTcChGeneralRequest
 * @return GetTcChGeneralResponse
 */
async function getTcChGeneral(request: GetTcChGeneralRequest): GetTcChGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTcChGeneralWithOptions(request, runtime);
}

model GetTsChEcomRequest {
  originQ?: string(name='OriginQ', description='This parameter is required.'),
  originT?: string(name='OriginT', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  type?: string(name='Type', description='This parameter is required.'),
}

model GetTsChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetTsChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTsChEcomResponseBody(name='body'),
}

/**
 * @param request GetTsChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTsChEcomResponse
 */
async function getTsChEcomWithOptions(request: GetTsChEcomRequest, runtime: Util.RuntimeOptions): GetTsChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.originQ)) {
    body['OriginQ'] = request.originQ;
  }
  if (!Util.isUnset(request.originT)) {
    body['OriginT'] = request.originT;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetTsChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetTsChEcomRequest
 * @return GetTsChEcomResponse
 */
async function getTsChEcom(request: GetTsChEcomRequest): GetTsChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTsChEcomWithOptions(request, runtime);
}

model GetUserUploadSignRequest {
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
}

model GetUserUploadSignResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetUserUploadSignResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserUploadSignResponseBody(name='body'),
}

/**
 * @param request GetUserUploadSignRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserUploadSignResponse
 */
async function getUserUploadSignWithOptions(request: GetUserUploadSignRequest, runtime: Util.RuntimeOptions): GetUserUploadSignResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetUserUploadSign',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetUserUploadSignRequest
 * @return GetUserUploadSignResponse
 */
async function getUserUploadSign(request: GetUserUploadSignRequest): GetUserUploadSignResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserUploadSignWithOptions(request, runtime);
}

model GetWeChCommentRequest {
  operation?: string(name='Operation'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  size?: string(name='Size'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId', description='This parameter is required.'),
  type?: string(name='Type'),
}

model GetWeChCommentResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWeChCommentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWeChCommentResponseBody(name='body'),
}

/**
 * @param request GetWeChCommentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWeChCommentResponse
 */
async function getWeChCommentWithOptions(request: GetWeChCommentRequest, runtime: Util.RuntimeOptions): GetWeChCommentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.operation)) {
    body['Operation'] = request.operation;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.size)) {
    body['Size'] = request.size;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWeChComment',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWeChCommentRequest
 * @return GetWeChCommentResponse
 */
async function getWeChComment(request: GetWeChCommentRequest): GetWeChCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWeChCommentWithOptions(request, runtime);
}

model GetWeChEcomRequest {
  operation?: string(name='Operation'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  size?: string(name='Size'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId', description='This parameter is required.'),
  type?: string(name='Type'),
}

model GetWeChEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWeChEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWeChEcomResponseBody(name='body'),
}

/**
 * @param request GetWeChEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWeChEcomResponse
 */
async function getWeChEcomWithOptions(request: GetWeChEcomRequest, runtime: Util.RuntimeOptions): GetWeChEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.operation)) {
    body['Operation'] = request.operation;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.size)) {
    body['Size'] = request.size;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWeChEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWeChEcomRequest
 * @return GetWeChEcomResponse
 */
async function getWeChEcom(request: GetWeChEcomRequest): GetWeChEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWeChEcomWithOptions(request, runtime);
}

model GetWeChEntertainmentRequest {
  operation?: string(name='Operation'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  size?: string(name='Size'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId', description='This parameter is required.'),
  type?: string(name='Type'),
}

model GetWeChEntertainmentResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWeChEntertainmentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWeChEntertainmentResponseBody(name='body'),
}

/**
 * @param request GetWeChEntertainmentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWeChEntertainmentResponse
 */
async function getWeChEntertainmentWithOptions(request: GetWeChEntertainmentRequest, runtime: Util.RuntimeOptions): GetWeChEntertainmentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.operation)) {
    body['Operation'] = request.operation;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.size)) {
    body['Size'] = request.size;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWeChEntertainment',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWeChEntertainmentRequest
 * @return GetWeChEntertainmentResponse
 */
async function getWeChEntertainment(request: GetWeChEntertainmentRequest): GetWeChEntertainmentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWeChEntertainmentWithOptions(request, runtime);
}

model GetWeChGeneralRequest {
  operation?: string(name='Operation'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  size?: string(name='Size'),
  text?: string(name='Text', description='This parameter is required.'),
  type?: string(name='Type'),
}

model GetWeChGeneralResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWeChGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWeChGeneralResponseBody(name='body'),
}

/**
 * @param request GetWeChGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWeChGeneralResponse
 */
async function getWeChGeneralWithOptions(request: GetWeChGeneralRequest, runtime: Util.RuntimeOptions): GetWeChGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.operation)) {
    body['Operation'] = request.operation;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.size)) {
    body['Size'] = request.size;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWeChGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWeChGeneralRequest
 * @return GetWeChGeneralResponse
 */
async function getWeChGeneral(request: GetWeChGeneralRequest): GetWeChGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWeChGeneralWithOptions(request, runtime);
}

model GetWeChSearchRequest {
  operation?: string(name='Operation'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  size?: string(name='Size'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId', description='This parameter is required.'),
  type?: string(name='Type'),
}

model GetWeChSearchResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWeChSearchResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWeChSearchResponseBody(name='body'),
}

/**
 * @param request GetWeChSearchRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWeChSearchResponse
 */
async function getWeChSearchWithOptions(request: GetWeChSearchRequest, runtime: Util.RuntimeOptions): GetWeChSearchResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.operation)) {
    body['Operation'] = request.operation;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.size)) {
    body['Size'] = request.size;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWeChSearch',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWeChSearchRequest
 * @return GetWeChSearchResponse
 */
async function getWeChSearch(request: GetWeChSearchRequest): GetWeChSearchResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWeChSearchWithOptions(request, runtime);
}

model GetWsChGeneralRequest {
  outType?: string(name='OutType'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId'),
}

model GetWsChGeneralResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWsChGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsChGeneralResponseBody(name='body'),
}

/**
 * @param request GetWsChGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsChGeneralResponse
 */
async function getWsChGeneralWithOptions(request: GetWsChGeneralRequest, runtime: Util.RuntimeOptions): GetWsChGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsChGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWsChGeneralRequest
 * @return GetWsChGeneralResponse
 */
async function getWsChGeneral(request: GetWsChGeneralRequest): GetWsChGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsChGeneralWithOptions(request, runtime);
}

model GetWsCustomizedChEcomCommentRequest {
  outType?: string(name='OutType'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId'),
}

model GetWsCustomizedChEcomCommentResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWsCustomizedChEcomCommentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsCustomizedChEcomCommentResponseBody(name='body'),
}

/**
 * @param request GetWsCustomizedChEcomCommentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsCustomizedChEcomCommentResponse
 */
async function getWsCustomizedChEcomCommentWithOptions(request: GetWsCustomizedChEcomCommentRequest, runtime: Util.RuntimeOptions): GetWsCustomizedChEcomCommentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsCustomizedChEcomComment',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWsCustomizedChEcomCommentRequest
 * @return GetWsCustomizedChEcomCommentResponse
 */
async function getWsCustomizedChEcomComment(request: GetWsCustomizedChEcomCommentRequest): GetWsCustomizedChEcomCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsCustomizedChEcomCommentWithOptions(request, runtime);
}

model GetWsCustomizedChEcomContentRequest {
  outType?: string(name='OutType'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId'),
}

model GetWsCustomizedChEcomContentResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWsCustomizedChEcomContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsCustomizedChEcomContentResponseBody(name='body'),
}

/**
 * @param request GetWsCustomizedChEcomContentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsCustomizedChEcomContentResponse
 */
async function getWsCustomizedChEcomContentWithOptions(request: GetWsCustomizedChEcomContentRequest, runtime: Util.RuntimeOptions): GetWsCustomizedChEcomContentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsCustomizedChEcomContent',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWsCustomizedChEcomContentRequest
 * @return GetWsCustomizedChEcomContentResponse
 */
async function getWsCustomizedChEcomContent(request: GetWsCustomizedChEcomContentRequest): GetWsCustomizedChEcomContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsCustomizedChEcomContentWithOptions(request, runtime);
}

model GetWsCustomizedChEcomTitleRequest {
  outType?: string(name='OutType'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId'),
}

model GetWsCustomizedChEcomTitleResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWsCustomizedChEcomTitleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsCustomizedChEcomTitleResponseBody(name='body'),
}

/**
 * @param request GetWsCustomizedChEcomTitleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsCustomizedChEcomTitleResponse
 */
async function getWsCustomizedChEcomTitleWithOptions(request: GetWsCustomizedChEcomTitleRequest, runtime: Util.RuntimeOptions): GetWsCustomizedChEcomTitleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsCustomizedChEcomTitle',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWsCustomizedChEcomTitleRequest
 * @return GetWsCustomizedChEcomTitleResponse
 */
async function getWsCustomizedChEcomTitle(request: GetWsCustomizedChEcomTitleRequest): GetWsCustomizedChEcomTitleResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsCustomizedChEcomTitleWithOptions(request, runtime);
}

model GetWsCustomizedChEntertainmentRequest {
  outType?: string(name='OutType'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId'),
}

model GetWsCustomizedChEntertainmentResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWsCustomizedChEntertainmentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsCustomizedChEntertainmentResponseBody(name='body'),
}

/**
 * @param request GetWsCustomizedChEntertainmentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsCustomizedChEntertainmentResponse
 */
async function getWsCustomizedChEntertainmentWithOptions(request: GetWsCustomizedChEntertainmentRequest, runtime: Util.RuntimeOptions): GetWsCustomizedChEntertainmentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsCustomizedChEntertainment',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWsCustomizedChEntertainmentRequest
 * @return GetWsCustomizedChEntertainmentResponse
 */
async function getWsCustomizedChEntertainment(request: GetWsCustomizedChEntertainmentRequest): GetWsCustomizedChEntertainmentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsCustomizedChEntertainmentWithOptions(request, runtime);
}

model GetWsCustomizedChGeneralRequest {
  outType?: string(name='OutType', example='a'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.', example='a'),
  text?: string(name='Text', description='This parameter is required.', example='a'),
  tokenizerId?: string(name='TokenizerId', example='a'),
}

model GetWsCustomizedChGeneralResponseBody = {
  data?: string(name='Data', example='a'),
  requestId?: string(name='RequestId', example='a'),
}

model GetWsCustomizedChGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsCustomizedChGeneralResponseBody(name='body'),
}

/**
 * @summary a
 *
 * @param request GetWsCustomizedChGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsCustomizedChGeneralResponse
 */
async function getWsCustomizedChGeneralWithOptions(request: GetWsCustomizedChGeneralRequest, runtime: Util.RuntimeOptions): GetWsCustomizedChGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsCustomizedChGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary a
 *
 * @param request GetWsCustomizedChGeneralRequest
 * @return GetWsCustomizedChGeneralResponse
 */
async function getWsCustomizedChGeneral(request: GetWsCustomizedChGeneralRequest): GetWsCustomizedChGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsCustomizedChGeneralWithOptions(request, runtime);
}

model GetWsCustomizedChO2ORequest {
  outType?: string(name='OutType'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
  tokenizerId?: string(name='TokenizerId'),
}

model GetWsCustomizedChO2OResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWsCustomizedChO2OResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsCustomizedChO2OResponseBody(name='body'),
}

/**
 * @param request GetWsCustomizedChO2ORequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsCustomizedChO2OResponse
 */
async function getWsCustomizedChO2OWithOptions(request: GetWsCustomizedChO2ORequest, runtime: Util.RuntimeOptions): GetWsCustomizedChO2OResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.outType)) {
    body['OutType'] = request.outType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  if (!Util.isUnset(request.tokenizerId)) {
    body['TokenizerId'] = request.tokenizerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsCustomizedChO2O',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWsCustomizedChO2ORequest
 * @return GetWsCustomizedChO2OResponse
 */
async function getWsCustomizedChO2O(request: GetWsCustomizedChO2ORequest): GetWsCustomizedChO2OResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsCustomizedChO2OWithOptions(request, runtime);
}

model GetWsCustomizedSeaEcomRequest {
  language?: string(name='Language', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetWsCustomizedSeaEcomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWsCustomizedSeaEcomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsCustomizedSeaEcomResponseBody(name='body'),
}

/**
 * @param request GetWsCustomizedSeaEcomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsCustomizedSeaEcomResponse
 */
async function getWsCustomizedSeaEcomWithOptions(request: GetWsCustomizedSeaEcomRequest, runtime: Util.RuntimeOptions): GetWsCustomizedSeaEcomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.language)) {
    body['Language'] = request.language;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsCustomizedSeaEcom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWsCustomizedSeaEcomRequest
 * @return GetWsCustomizedSeaEcomResponse
 */
async function getWsCustomizedSeaEcom(request: GetWsCustomizedSeaEcomRequest): GetWsCustomizedSeaEcomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsCustomizedSeaEcomWithOptions(request, runtime);
}

model GetWsCustomizedSeaGeneralRequest {
  language?: string(name='Language', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
  text?: string(name='Text', description='This parameter is required.'),
}

model GetWsCustomizedSeaGeneralResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetWsCustomizedSeaGeneralResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWsCustomizedSeaGeneralResponseBody(name='body'),
}

/**
 * @param request GetWsCustomizedSeaGeneralRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWsCustomizedSeaGeneralResponse
 */
async function getWsCustomizedSeaGeneralWithOptions(request: GetWsCustomizedSeaGeneralRequest, runtime: Util.RuntimeOptions): GetWsCustomizedSeaGeneralResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.language)) {
    body['Language'] = request.language;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.text)) {
    body['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWsCustomizedSeaGeneral',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWsCustomizedSeaGeneralRequest
 * @return GetWsCustomizedSeaGeneralResponse
 */
async function getWsCustomizedSeaGeneral(request: GetWsCustomizedSeaGeneralRequest): GetWsCustomizedSeaGeneralResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWsCustomizedSeaGeneralWithOptions(request, runtime);
}

model ImportServiceDataRequest {
  partition?: [ map[string]string ](name='Partition'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
  subPath?: string(name='SubPath', example='directoryName'),
  url?: string(name='Url'),
}

model ImportServiceDataShrinkRequest {
  partitionShrink?: string(name='Partition'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
  subPath?: string(name='SubPath', example='directoryName'),
  url?: string(name='Url'),
}

model ImportServiceDataResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: long(name='Data', example='1'),
  msg?: string(name='Msg', example='null'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model ImportServiceDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportServiceDataResponseBody(name='body'),
}

/**
 * @summary 导入服务数据
 *
 * @param tmpReq ImportServiceDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportServiceDataResponse
 */
async function importServiceDataWithOptions(tmpReq: ImportServiceDataRequest, runtime: Util.RuntimeOptions): ImportServiceDataResponse {
  Util.validateModel(tmpReq);
  var request = new ImportServiceDataShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.partition)) {
    request.partitionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.partition, 'Partition', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.partitionShrink)) {
    body['Partition'] = request.partitionShrink;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  if (!Util.isUnset(request.subPath)) {
    body['SubPath'] = request.subPath;
  }
  if (!Util.isUnset(request.url)) {
    body['Url'] = request.url;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ImportServiceData',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导入服务数据
 *
 * @param request ImportServiceDataRequest
 * @return ImportServiceDataResponse
 */
async function importServiceData(request: ImportServiceDataRequest): ImportServiceDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return importServiceDataWithOptions(request, runtime);
}

model ImportServiceDataV2Request {
  dataType?: string(name='DataType', example='docuemnt'),
  documents?: [ 
    {
      bizParams?: map[string]string(name='BizParams'),
      docId?: string(name='DocId', example='1'),
      fileExtension?: string(name='FileExtension', example='txt'),
      fileName?: string(name='FileName'),
      filePath?: string(name='FilePath', example='http://xxxx.txt'),
      version?: string(name='Version', example='20240101'),
    }
  ](name='Documents'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
}

model ImportServiceDataV2ShrinkRequest {
  dataType?: string(name='DataType', example='docuemnt'),
  documentsShrink?: string(name='Documents'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
}

model ImportServiceDataV2ResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: long(name='Data', example='1'),
  msg?: string(name='Msg', example='null'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model ImportServiceDataV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportServiceDataV2ResponseBody(name='body'),
}

/**
 * @summary 导入服务数据V2
 *
 * @param tmpReq ImportServiceDataV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportServiceDataV2Response
 */
async function importServiceDataV2WithOptions(tmpReq: ImportServiceDataV2Request, runtime: Util.RuntimeOptions): ImportServiceDataV2Response {
  Util.validateModel(tmpReq);
  var request = new ImportServiceDataV2ShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.documents)) {
    request.documentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.documents, 'Documents', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.dataType)) {
    body['DataType'] = request.dataType;
  }
  if (!Util.isUnset(request.documentsShrink)) {
    body['Documents'] = request.documentsShrink;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ImportServiceDataV2',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导入服务数据V2
 *
 * @param request ImportServiceDataV2Request
 * @return ImportServiceDataV2Response
 */
async function importServiceDataV2(request: ImportServiceDataV2Request): ImportServiceDataV2Response {
  var runtime = new Util.RuntimeOptions{};
  return importServiceDataV2WithOptions(request, runtime);
}

model InsertCustomRequest {
  apiId?: int32(name='ApiId', description='This parameter is required.'),
  customFileName?: string(name='CustomFileName'),
  customUrl?: string(name='CustomUrl'),
  regFileName?: string(name='RegFileName'),
  regUrl?: string(name='RegUrl'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
}

model InsertCustomResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model InsertCustomResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertCustomResponseBody(name='body'),
}

/**
 * @param request InsertCustomRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertCustomResponse
 */
async function insertCustomWithOptions(request: InsertCustomRequest, runtime: Util.RuntimeOptions): InsertCustomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.apiId)) {
    body['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.customFileName)) {
    body['CustomFileName'] = request.customFileName;
  }
  if (!Util.isUnset(request.customUrl)) {
    body['CustomUrl'] = request.customUrl;
  }
  if (!Util.isUnset(request.regFileName)) {
    body['RegFileName'] = request.regFileName;
  }
  if (!Util.isUnset(request.regUrl)) {
    body['RegUrl'] = request.regUrl;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InsertCustom',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request InsertCustomRequest
 * @return InsertCustomResponse
 */
async function insertCustom(request: InsertCustomRequest): InsertCustomResponse {
  var runtime = new Util.RuntimeOptions{};
  return insertCustomWithOptions(request, runtime);
}

model OpenAlinlpServiceResponseBody = {
  orderId?: string(name='OrderId'),
  requestId?: string(name='RequestId'),
}

model OpenAlinlpServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OpenAlinlpServiceResponseBody(name='body'),
}

/**
 * @param request OpenAlinlpServiceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OpenAlinlpServiceResponse
 */
async function openAlinlpServiceWithOptions(runtime: Util.RuntimeOptions): OpenAlinlpServiceResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'OpenAlinlpService',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @return OpenAlinlpServiceResponse
 */
async function openAlinlpService(): OpenAlinlpServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return openAlinlpServiceWithOptions(runtime);
}

model PostISConvRewriterRequest {
  algorithm?: string(name='Algorithm', example='"conversation_rewriter"'),
  debug?: boolean(name='Debug', example='false'),
  input?: map[string]any(name='Input'),
  model?: string(name='Model'),
  parameters?: map[string]any(name='Parameters'),
}

model PostISConvRewriterShrinkRequest {
  algorithm?: string(name='Algorithm', example='"conversation_rewriter"'),
  debug?: boolean(name='Debug', example='false'),
  inputShrink?: string(name='Input'),
  model?: string(name='Model'),
  parametersShrink?: string(name='Parameters'),
}

model PostISConvRewriterResponseBody = {
  data?: map[string]any(name='Data'),
  debugInfo?: map[string]any(name='DebugInfo'),
  message?: string(name='Message', example='null'),
  requestId?: string(name='RequestId', example='"xxx"'),
  status?: int32(name='Status', example='0'),
}

model PostISConvRewriterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PostISConvRewriterResponseBody(name='body'),
}

/**
 * @summary 多轮改写
 *
 * @param tmpReq PostISConvRewriterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PostISConvRewriterResponse
 */
async function postISConvRewriterWithOptions(tmpReq: PostISConvRewriterRequest, runtime: Util.RuntimeOptions): PostISConvRewriterResponse {
  Util.validateModel(tmpReq);
  var request = new PostISConvRewriterShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.input)) {
    request.inputShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.input, 'Input', 'json');
  }
  if (!Util.isUnset(tmpReq.parameters)) {
    request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithm)) {
    body['Algorithm'] = request.algorithm;
  }
  if (!Util.isUnset(request.debug)) {
    body['Debug'] = request.debug;
  }
  if (!Util.isUnset(request.inputShrink)) {
    body['Input'] = request.inputShrink;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.parametersShrink)) {
    body['Parameters'] = request.parametersShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PostISConvRewriter',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 多轮改写
 *
 * @param request PostISConvRewriterRequest
 * @return PostISConvRewriterResponse
 */
async function postISConvRewriter(request: PostISConvRewriterRequest): PostISConvRewriterResponse {
  var runtime = new Util.RuntimeOptions{};
  return postISConvRewriterWithOptions(request, runtime);
}

model PostISRerankRequest {
  algorithm?: string(name='Algorithm', example='rerank'),
  debug?: boolean(name='Debug', example='false'),
  input?: map[string]any(name='Input'),
  model?: string(name='Model', example='gte-rerank'),
  parameters?: map[string]any(name='Parameters'),
}

model PostISRerankShrinkRequest {
  algorithm?: string(name='Algorithm', example='rerank'),
  debug?: boolean(name='Debug', example='false'),
  inputShrink?: string(name='Input'),
  model?: string(name='Model', example='gte-rerank'),
  parametersShrink?: string(name='Parameters'),
}

model PostISRerankResponseBody = {
  data?: map[string]any(name='Data'),
  debugInfo?: map[string]any(name='DebugInfo'),
  message?: string(name='Message', example='null'),
  requestId?: string(name='RequestId', example='xxx'),
  status?: int32(name='Status', example='0'),
}

model PostISRerankResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PostISRerankResponseBody(name='body'),
}

/**
 * @summary 通用排序模型
 *
 * @param tmpReq PostISRerankRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PostISRerankResponse
 */
async function postISRerankWithOptions(tmpReq: PostISRerankRequest, runtime: Util.RuntimeOptions): PostISRerankResponse {
  Util.validateModel(tmpReq);
  var request = new PostISRerankShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.input)) {
    request.inputShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.input, 'Input', 'json');
  }
  if (!Util.isUnset(tmpReq.parameters)) {
    request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithm)) {
    body['Algorithm'] = request.algorithm;
  }
  if (!Util.isUnset(request.debug)) {
    body['Debug'] = request.debug;
  }
  if (!Util.isUnset(request.inputShrink)) {
    body['Input'] = request.inputShrink;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.parametersShrink)) {
    body['Parameters'] = request.parametersShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PostISRerank',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通用排序模型
 *
 * @param request PostISRerankRequest
 * @return PostISRerankResponse
 */
async function postISRerank(request: PostISRerankRequest): PostISRerankResponse {
  var runtime = new Util.RuntimeOptions{};
  return postISRerankWithOptions(request, runtime);
}

model PostISRetrieveRouterRequest {
  algorithm?: string(name='Algorithm', example='"retrieve_router"'),
  debug?: boolean(name='Debug', example='false'),
  input?: map[string]any(name='Input'),
  model?: string(name='Model'),
  parameters?: map[string]any(name='Parameters'),
}

model PostISRetrieveRouterShrinkRequest {
  algorithm?: string(name='Algorithm', example='"retrieve_router"'),
  debug?: boolean(name='Debug', example='false'),
  inputShrink?: string(name='Input'),
  model?: string(name='Model'),
  parametersShrink?: string(name='Parameters'),
}

model PostISRetrieveRouterResponseBody = {
  data?: map[string]any(name='Data'),
  debugInfo?: map[string]any(name='DebugInfo'),
  message?: string(name='Message', example='null'),
  requestId?: string(name='RequestId', example='"xxx"'),
  status?: int32(name='Status', example='0'),
}

model PostISRetrieveRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PostISRetrieveRouterResponseBody(name='body'),
}

/**
 * @summary 开放域搜索判定
 *
 * @param tmpReq PostISRetrieveRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PostISRetrieveRouterResponse
 */
async function postISRetrieveRouterWithOptions(tmpReq: PostISRetrieveRouterRequest, runtime: Util.RuntimeOptions): PostISRetrieveRouterResponse {
  Util.validateModel(tmpReq);
  var request = new PostISRetrieveRouterShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.input)) {
    request.inputShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.input, 'Input', 'json');
  }
  if (!Util.isUnset(tmpReq.parameters)) {
    request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.debug)) {
    query['Debug'] = request.debug;
  }
  if (!Util.isUnset(request.inputShrink)) {
    query['Input'] = request.inputShrink;
  }
  if (!Util.isUnset(request.parametersShrink)) {
    query['Parameters'] = request.parametersShrink;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithm)) {
    body['Algorithm'] = request.algorithm;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PostISRetrieveRouter',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 开放域搜索判定
 *
 * @param request PostISRetrieveRouterRequest
 * @return PostISRetrieveRouterResponse
 */
async function postISRetrieveRouter(request: PostISRetrieveRouterRequest): PostISRetrieveRouterResponse {
  var runtime = new Util.RuntimeOptions{};
  return postISRetrieveRouterWithOptions(request, runtime);
}

model PostMSConvSearchTokenGeneratedResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='toY1FWrNAjvWkOmp24+UQFIi2PsYzbhNBq+yJmzumNmXw3sro3oOt9Kde5kzLcc4'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='ok'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='True'),
}

model PostMSConvSearchTokenGeneratedResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PostMSConvSearchTokenGeneratedResponseBody(name='body'),
}

/**
 * @summary 对话搜索身份凭证生成
 *
 * @param request PostMSConvSearchTokenGeneratedRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PostMSConvSearchTokenGeneratedResponse
 */
async function postMSConvSearchTokenGeneratedWithOptions(runtime: Util.RuntimeOptions): PostMSConvSearchTokenGeneratedResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'PostMSConvSearchTokenGenerated',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 对话搜索身份凭证生成
 *
 * @return PostMSConvSearchTokenGeneratedResponse
 */
async function postMSConvSearchTokenGenerated(): PostMSConvSearchTokenGeneratedResponse {
  var runtime = new Util.RuntimeOptions{};
  return postMSConvSearchTokenGeneratedWithOptions(runtime);
}

model PostMSDataProcessingCountRequest {
  dataIds?: [ string ](name='DataIds'),
  dataImportId?: long(name='DataImportId', example='103654'),
  serviceId?: long(name='ServiceId', example='325'),
  xDashScopeOpenAPISource?: string(name='X-DashScope-OpenAPISource'),
}

model PostMSDataProcessingCountShrinkRequest {
  dataIdsShrink?: string(name='DataIds'),
  dataImportId?: long(name='DataImportId', example='103654'),
  serviceId?: long(name='ServiceId', example='325'),
  xDashScopeOpenAPISource?: string(name='X-DashScope-OpenAPISource'),
}

model PostMSDataProcessingCountResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    dataProcessedStatuses?: [ 
      {
        chunkNum?: string(name='ChunkNum', example='"11"'),
        dataId?: string(name='DataId', example='"1"'),
        errorDataList?: [ 
          {
            count?: int32(name='Count', example='2'),
            errorCode?: string(name='ErrorCode', example='0'),
            opType?: string(name='OpType', example='chunk'),
          }
        ](name='ErrorDataList'),
        opStatus?: map[string]int32(name='OpStatus'),
        status?: string(name='Status', example='success'),
        versionValue?: string(name='VersionValue', example='2023-01-22 18:44:00'),
      }
    ](name='DataProcessedStatuses'),
    status?: string(name='Status', example='success'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='null'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model PostMSDataProcessingCountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PostMSDataProcessingCountResponseBody(name='body'),
}

/**
 * @summary 数据处理进度查询
 *
 * @param tmpReq PostMSDataProcessingCountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PostMSDataProcessingCountResponse
 */
async function postMSDataProcessingCountWithOptions(tmpReq: PostMSDataProcessingCountRequest, runtime: Util.RuntimeOptions): PostMSDataProcessingCountResponse {
  Util.validateModel(tmpReq);
  var request = new PostMSDataProcessingCountShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.dataIds)) {
    request.dataIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.dataIds, 'DataIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.dataIdsShrink)) {
    body['DataIds'] = request.dataIdsShrink;
  }
  if (!Util.isUnset(request.dataImportId)) {
    body['DataImportId'] = request.dataImportId;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  if (!Util.isUnset(request.xDashScopeOpenAPISource)) {
    body['X-DashScope-OpenAPISource'] = request.xDashScopeOpenAPISource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PostMSDataProcessingCount',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 数据处理进度查询
 *
 * @param request PostMSDataProcessingCountRequest
 * @return PostMSDataProcessingCountResponse
 */
async function postMSDataProcessingCount(request: PostMSDataProcessingCountRequest): PostMSDataProcessingCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return postMSDataProcessingCountWithOptions(request, runtime);
}

model PostMSSearchEnhanceRequest {
  body?: string(name='Body', example='{}'),
  customConfigInfo?: map[string]any(name='CustomConfigInfo'),
  debug?: boolean(name='Debug', example='0'),
  fields?: [ string ](name='Fields'),
  filters?: string(name='Filters', example='[]'),
  minScore?: double(name='MinScore'),
  page?: int32(name='Page', example='1'),
  queries?: string(name='Queries', example='[]'),
  rankModelInfo?: map[string]any(name='RankModelInfo'),
  rows?: int32(name='Rows', example='10'),
  serviceId?: long(name='ServiceId', example='101'),
  sort?: [ string ](name='Sort'),
  type?: string(name='Type'),
  uq?: string(name='Uq'),
  xDashScopeOpenAPISource?: string(name='X-DashScope-OpenAPISource'),
}

model PostMSSearchEnhanceShrinkRequest {
  body?: string(name='Body', example='{}'),
  customConfigInfoShrink?: string(name='CustomConfigInfo'),
  debug?: boolean(name='Debug', example='0'),
  fieldsShrink?: string(name='Fields'),
  filters?: string(name='Filters', example='[]'),
  minScore?: double(name='MinScore'),
  page?: int32(name='Page', example='1'),
  queries?: string(name='Queries', example='[]'),
  rankModelInfoShrink?: string(name='RankModelInfo'),
  rows?: int32(name='Rows', example='10'),
  serviceId?: long(name='ServiceId', example='101'),
  sortShrink?: string(name='Sort'),
  type?: string(name='Type'),
  uq?: string(name='Uq'),
  xDashScopeOpenAPISource?: string(name='X-DashScope-OpenAPISource'),
}

model PostMSSearchEnhanceResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: any(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='""'),
  requestId?: string(name='RequestId', description='Id of the request', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model PostMSSearchEnhanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PostMSSearchEnhanceResponseBody(name='body'),
}

/**
 * @summary 搜索增强
 *
 * @param tmpReq PostMSSearchEnhanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PostMSSearchEnhanceResponse
 */
async function postMSSearchEnhanceWithOptions(tmpReq: PostMSSearchEnhanceRequest, runtime: Util.RuntimeOptions): PostMSSearchEnhanceResponse {
  Util.validateModel(tmpReq);
  var request = new PostMSSearchEnhanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.customConfigInfo)) {
    request.customConfigInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.customConfigInfo, 'CustomConfigInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.fields)) {
    request.fieldsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.fields, 'Fields', 'json');
  }
  if (!Util.isUnset(tmpReq.rankModelInfo)) {
    request.rankModelInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.rankModelInfo, 'RankModelInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.body)) {
    body['Body'] = request.body;
  }
  if (!Util.isUnset(request.customConfigInfoShrink)) {
    body['CustomConfigInfo'] = request.customConfigInfoShrink;
  }
  if (!Util.isUnset(request.debug)) {
    body['Debug'] = request.debug;
  }
  if (!Util.isUnset(request.fieldsShrink)) {
    body['Fields'] = request.fieldsShrink;
  }
  if (!Util.isUnset(request.filters)) {
    body['Filters'] = request.filters;
  }
  if (!Util.isUnset(request.minScore)) {
    body['MinScore'] = request.minScore;
  }
  if (!Util.isUnset(request.page)) {
    body['Page'] = request.page;
  }
  if (!Util.isUnset(request.queries)) {
    body['Queries'] = request.queries;
  }
  if (!Util.isUnset(request.rankModelInfoShrink)) {
    body['RankModelInfo'] = request.rankModelInfoShrink;
  }
  if (!Util.isUnset(request.rows)) {
    body['Rows'] = request.rows;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  if (!Util.isUnset(request.uq)) {
    body['Uq'] = request.uq;
  }
  if (!Util.isUnset(request.xDashScopeOpenAPISource)) {
    body['X-DashScope-OpenAPISource'] = request.xDashScopeOpenAPISource;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PostMSSearchEnhance',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 搜索增强
 *
 * @param request PostMSSearchEnhanceRequest
 * @return PostMSSearchEnhanceResponse
 */
async function postMSSearchEnhance(request: PostMSSearchEnhanceRequest): PostMSSearchEnhanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return postMSSearchEnhanceWithOptions(request, runtime);
}

model PostMSServiceDataImportRequest {
  dataType?: string(name='DataType', example='document'),
  documents?: [ 
    {
      bizParams?: map[string]any(name='BizParams'),
      docId?: string(name='DocId', example='1'),
      fileExtension?: string(name='FileExtension', example='pdf'),
      fileName?: string(name='FileName'),
      filePath?: string(name='FilePath'),
      version?: string(name='Version', example='20240101'),
    }
  ](name='Documents'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
}

model PostMSServiceDataImportShrinkRequest {
  dataType?: string(name='DataType', example='document'),
  documentsShrink?: string(name='Documents'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
}

model PostMSServiceDataImportResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: long(name='Data', example='1'),
  msg?: string(name='Msg', example='null'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model PostMSServiceDataImportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PostMSServiceDataImportResponseBody(name='body'),
}

/**
 * @summary 导入服务数据V2
 *
 * @param tmpReq PostMSServiceDataImportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PostMSServiceDataImportResponse
 */
async function postMSServiceDataImportWithOptions(tmpReq: PostMSServiceDataImportRequest, runtime: Util.RuntimeOptions): PostMSServiceDataImportResponse {
  Util.validateModel(tmpReq);
  var request = new PostMSServiceDataImportShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.documents)) {
    request.documentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.documents, 'Documents', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.dataType)) {
    body['DataType'] = request.dataType;
  }
  if (!Util.isUnset(request.documentsShrink)) {
    body['Documents'] = request.documentsShrink;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PostMSServiceDataImport',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导入服务数据V2
 *
 * @param request PostMSServiceDataImportRequest
 * @return PostMSServiceDataImportResponse
 */
async function postMSServiceDataImport(request: PostMSServiceDataImportRequest): PostMSServiceDataImportResponse {
  var runtime = new Util.RuntimeOptions{};
  return postMSServiceDataImportWithOptions(request, runtime);
}

model RequestTableQARequest {
  params?: string(name='Params', description='This parameter is required.'),
  serviceCode?: string(name='ServiceCode', description='This parameter is required.'),
}

model RequestTableQAResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model RequestTableQAResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RequestTableQAResponseBody(name='body'),
}

/**
 * @param request RequestTableQARequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RequestTableQAResponse
 */
async function requestTableQAWithOptions(request: RequestTableQARequest, runtime: Util.RuntimeOptions): RequestTableQAResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.params)) {
    body['Params'] = request.params;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RequestTableQA',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RequestTableQARequest
 * @return RequestTableQAResponse
 */
async function requestTableQA(request: RequestTableQARequest): RequestTableQAResponse {
  var runtime = new Util.RuntimeOptions{};
  return requestTableQAWithOptions(request, runtime);
}

model RequestTableQAOnlineRequest {
  botId?: string(name='BotId'),
  params?: string(name='Params'),
  question?: string(name='Question'),
  serviceCode?: string(name='ServiceCode'),
}

model RequestTableQAOnlineResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model RequestTableQAOnlineResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RequestTableQAOnlineResponseBody(name='body'),
}

/**
 * @summary 表格问答在线接口
 *
 * @param request RequestTableQAOnlineRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RequestTableQAOnlineResponse
 */
async function requestTableQAOnlineWithOptions(request: RequestTableQAOnlineRequest, runtime: Util.RuntimeOptions): RequestTableQAOnlineResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.botId)) {
    body['BotId'] = request.botId;
  }
  if (!Util.isUnset(request.params)) {
    body['Params'] = request.params;
  }
  if (!Util.isUnset(request.question)) {
    body['Question'] = request.question;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RequestTableQAOnline',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 表格问答在线接口
 *
 * @param request RequestTableQAOnlineRequest
 * @return RequestTableQAOnlineResponse
 */
async function requestTableQAOnline(request: RequestTableQAOnlineRequest): RequestTableQAOnlineResponse {
  var runtime = new Util.RuntimeOptions{};
  return requestTableQAOnlineWithOptions(request, runtime);
}

model UpdateServiceDataRequest {
  conditions?: map[string]any(name='Conditions', description='This parameter is required.'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
}

model UpdateServiceDataShrinkRequest {
  conditionsShrink?: string(name='Conditions', description='This parameter is required.'),
  serviceId?: long(name='ServiceId', description='This parameter is required.', example='1'),
}

model UpdateServiceDataResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: any(name='Data', example='null'),
  msg?: string(name='Msg', example='null'),
  requestId?: string(name='RequestId', example='6A8108E0-B9CD-5E74-B312-50E6E1AC1722'),
  success?: boolean(name='Success', example='true'),
}

model UpdateServiceDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateServiceDataResponseBody(name='body'),
}

/**
 * @summary 更新服务数据
 *
 * @param tmpReq UpdateServiceDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateServiceDataResponse
 */
async function updateServiceDataWithOptions(tmpReq: UpdateServiceDataRequest, runtime: Util.RuntimeOptions): UpdateServiceDataResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateServiceDataShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.conditions)) {
    request.conditionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.conditions, 'Conditions', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.conditionsShrink)) {
    body['Conditions'] = request.conditionsShrink;
  }
  if (!Util.isUnset(request.serviceId)) {
    body['ServiceId'] = request.serviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateServiceData',
    version = '2020-06-29',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新服务数据
 *
 * @param request UpdateServiceDataRequest
 * @return UpdateServiceDataResponse
 */
async function updateServiceData(request: UpdateServiceDataRequest): UpdateServiceDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateServiceDataWithOptions(request, runtime);
}

